//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - EntityName
// 1 - Properties
//===================================================================================

namespace App.Domain.Handlers {
    using App.Data;
    using App.Domain.Contracts;
    using App.Domain.Models;

    public class UpdateWork {
        private readonly IWorkRepository _workRepository;

        public UpdateWork(IWorkRepository workRepository) {
            _workRepository = workRepository;
        }

        public void Execute(ICreateWorkCommand workForm) {
            var work = workForm.ConvertToEntity();

            _workRepository.Update(work);
        }
    }
}
